home *** CD-ROM | disk | FTP | other *** search
/ Cracking 2 / Cracking II..iso / Tools / icedump 6.018 and nticedump 1.9 / wnt / src / ntice.inc < prev    next >
Encoding:
Text File  |  2000-07-26  |  5.3 KB  |  259 lines

  1. ; for v3.22, v3.23, v3.24, v3.25, v4.00, v4.01, v4.05
  2. ; some symbols to make the code more readable
  3.  
  4. %ifndef INCLUDED_NTICE_INC
  5. %define INCLUDED_NTICE_INC
  6.  
  7. NTICEDUMP_BUILD EQU 0x0009
  8.  
  9. %define NTICEDUMP_ID 'IDMP'
  10.  
  11. %define VERSION_TO_ASCII(v) '0'+((v) >> 8),'.','0'+(((v) >> 4) & 0xf),'0'+((v) & 0xf)
  12.  
  13. %ifndef NTICE_VERSION
  14. %error please %define NTICE_VERSION
  15. %endif
  16.  
  17.  
  18. %if NTICE_VERSION = 0x322
  19.  
  20.     %assign PAGEIN_PATCH_ORIGIN 0xE3C14
  21.  
  22.     PAGEIN_CMDLINE    EQU 0x1F124
  23.     PAGEIN_PARSER    EQU 0x1F129
  24.  
  25.     dIGNOREFAULTS1    EQU 0x8E583
  26.     dIGNOREFAULTS2    EQU 0x8E587
  27.  
  28.     PCI_VENDORS    EQU 0x60388
  29.         SELF_REF        EQU 0x38E9B      
  30.     CRS_END        EQU 0x37AE9
  31.  
  32.     pNticeInit    EQU 0x3AE8D
  33.     pSaveRegs    EQU 0x37AD6
  34.     pRestoreRegs    EQU 0x37B6D
  35.  
  36.     %include "ntice322.inc"
  37.  
  38. %elif NTICE_VERSION = 0x323
  39.  
  40.     %assign PAGEIN_PATCH_ORIGIN 0xE9F8C
  41.  
  42.     PAGEIN_CMDLINE    EQU 0x1F6A0
  43.     PAGEIN_PARSER    EQU 0x1F6A5
  44.  
  45.     dIGNOREFAULTS1    EQU 0x90AAB
  46.     dIGNOREFAULTS2    EQU 0x90AAF
  47.  
  48.     PCI_VENDORS    EQU 0x62D28
  49.         SELF_REF        EQU 0x39908
  50.     CRS_END        EQU 0x38529
  51.  
  52.     pNticeInit    EQU 0x3B91B
  53.     pSaveRegs    EQU 0x38516
  54.     pRestoreRegs    EQU 0x385AD
  55.  
  56.     %include "ntice323.inc"
  57.  
  58. %elif NTICE_VERSION = 0x324
  59.  
  60.     %assign PAGEIN_PATCH_ORIGIN 0xE87E4
  61.  
  62.     PAGEIN_CMDLINE    EQU 0x1F6E0
  63.     PAGEIN_PARSER    EQU 0x1F6E5
  64.  
  65.     dIGNOREFAULTS1    EQU 0x90B8B
  66.     dIGNOREFAULTS2    EQU 0x90B8F
  67.  
  68.     PCI_VENDORS    EQU 0x62E50
  69.  
  70.     CRS_END        EQU 0x38631
  71.  
  72.     pNticeInit    EQU 0xF2BA0
  73.     pSaveRegs    EQU 0x3861E
  74.     pRestoreRegs    EQU 0x386B5
  75.  
  76.     %include "ntice324.inc"
  77.  
  78. %elif NTICE_VERSION = 0x325
  79.  
  80.     %assign PAGEIN_PATCH_ORIGIN 0xF8624
  81.  
  82.     PAGEIN_CMDLINE    EQU 0x1F6CB
  83.     PAGEIN_PARSER    EQU 0x1F6D0
  84.  
  85.     dIGNOREFAULTS1    EQU 0x9DC8E
  86.     dIGNOREFAULTS2    EQU 0x9DC92
  87.  
  88.     PCI_VENDORS    EQU 0x66C90
  89.  
  90.     CRS_END        EQU 0x3868D
  91.  
  92.     pNticeInit    EQU 0x102E20
  93.     pSaveRegs    EQU 0x3867A
  94.     pRestoreRegs    EQU 0x38711
  95.  
  96.     %include "ntice325.inc"
  97.  
  98. %elif NTICE_VERSION = 0x400
  99.  
  100.     %assign PAGEIN_PATCH_ORIGIN 0x1209F8
  101.  
  102.     PAGEIN_CMDLINE    EQU 0x203F7
  103.     PAGEIN_PARSER    EQU 0x203FC
  104.  
  105.     dIGNOREFAULTS1    EQU 0xBD502
  106.     dIGNOREFAULTS2    EQU 0xBD506
  107.  
  108.     PCI_VENDORS    EQU 0x74408
  109.  
  110.     CRS_END        EQU 0x394FD
  111.  
  112.     pNticeInit    EQU 0x12BE40
  113.     pSaveRegs    EQU 0x394EA
  114.     pRestoreRegs    EQU 0x39581
  115.  
  116.     %include "ntice400.inc"
  117.  
  118. %elif NTICE_VERSION = 0x401
  119.  
  120.     %assign PAGEIN_PATCH_ORIGIN 0x120A58
  121.  
  122.     PAGEIN_CMDLINE    EQU 0x20427
  123.     PAGEIN_PARSER    EQU 0x2042C
  124.  
  125.     dIGNOREFAULTS1    EQU 0xBD562
  126.     dIGNOREFAULTS2    EQU 0xBD566
  127.  
  128.     PCI_VENDORS    EQU 0x74458
  129.  
  130.     CRS_END        EQU 0x39541
  131.  
  132.     pNticeInit    EQU 0x12BEA0
  133.     pSaveRegs    EQU 0x3952E
  134.     pRestoreRegs    EQU 0x395C5
  135.  
  136.     %include "ntice401.inc"
  137.  
  138. %elif NTICE_VERSION = 0x405
  139.  
  140.     %assign PAGEIN_PATCH_ORIGIN 0x201F4
  141.  
  142.     PAGEIN_CMDLINE    EQU 0x37EA3
  143.     PAGEIN_PARSER    EQU 0x37EA8
  144.  
  145.     dIGNOREFAULTS1    EQU 0x9C8C3
  146.     dIGNOREFAULTS2    EQU 0x9C8C7
  147.  
  148.     PCI_VENDORS    EQU 0x1CF28
  149.  
  150.     CRS_END        EQU 0x5103B
  151.  
  152.     pNticeInit    EQU 0x131B64
  153.     pSaveRegs    EQU 0x51028
  154.     pRestoreRegs    EQU 0x510BF
  155.  
  156.     %include "ntice405.inc"
  157.  
  158. %else
  159. %error unsupported version: NTICE_VERSION
  160. %endif
  161.  
  162. struc BhramaComStruc
  163. .version    resd 1    ; Internal Check (03h)
  164. .PID        resd 1    ; Target PID
  165. .EIP        resd 1    ; EntryPoint to Set after DUMP
  166. .OptL1        resd 1    ; Internal ProcDump Options Dword1
  167. .OptL2        resd 1    ; Internal ProcDump Options Dword2
  168. .OptL3        resd 1    ; Internal ProcDump Options Dword3
  169. .OptL4        resd 1    ; Internal ProcDump Options Dword4
  170. .OptL5        resd 1    ; Internal ProcDump Options Dword5
  171. endstruc
  172.  
  173. WM_COPYDATA    EQU 004Ah
  174.  
  175. ; Client Register Structure as passed to debug services ... Not NT standard
  176. struc CRS
  177. Client_EDI    resd 1        ; 0
  178. Client_ESI    resd 1        ; 4
  179. Client_EBP    resd 1        ; 8
  180. Client_res0    resd 1        ; C
  181. Client_EBX    resd 1        ; 10
  182. Client_EDX    resd 1        ; 14
  183. Client_ECX    resd 1        ; 18
  184. Client_EAX    resd 1        ; 1C
  185. Client_Error    resd 1        ; 20
  186. Client_EIP    resd 1        ; 24
  187. Client_CS    resw 1        ; 28
  188. Client_res1    resw 1        ; 2C
  189. Client_EFlags    resd 1        ; 30
  190. Client_ESP    resd 1        ; 34
  191. Client_SS    resw 1        ; 38
  192. Client_res2    resw 1
  193. Client_ES    resw 1        ; 3C
  194. Client_res3    resw 1
  195. Client_DS    resw 1        ; 40
  196. Client_res4    resw 1
  197. Client_FS    resw 1        ; 44
  198. Client_res5    resw 1
  199. Client_GS    resw 1        ; 48
  200. Client_res6    resw 1
  201. Client_Alt_EIP    resd 1        ; 4C
  202. Client_Alt_CS    resw 1        ; 50
  203. Client_res7    resw 1
  204. Client_Alt_EFlags    resd 1
  205. Client_Alt_ESP    resd 1
  206. Client_Alt_SS    resw 1
  207. Client_res8    resw 1
  208. Client_Alt_ES    resw 1
  209. Client_res9    resw 1
  210. Client_Alt_DS    resw 1
  211. Client_res10    resw 1
  212. Client_Alt_FS    resw 1
  213. Client_res11    resw 1
  214. Client_Alt_GS    resw 1
  215. Client_res12    resw 1
  216. endstruc
  217.  
  218. struc NTIcedumpHdr
  219. .ID        resd 1    ; nticedump patch ID
  220. .Len        resw 1    ; header size
  221. .PatchVer    resw 1    ; nticedump patcher version
  222. .Ver        resd 1    ; nticedump version
  223. .SiVer        resd 1    ; target SoftIce version
  224. .VA         resd 1    ; RVA of Call to Init
  225. endstruc
  226.  
  227. %define        ZwCreateFile            0
  228. %define        ZwReadFile            4
  229. %define        ZwWriteFile            2*4
  230. %define        ZwClose                3*4
  231. %define        RtlAnsiStringToUnicodeString    4*4
  232. %define        RtlInitAnsiString        5*4
  233. %define        DbgPrint            6*4
  234. %define        RtlFreeUnicodeString        7*4
  235. %define        MmIsAddressValid        8*4
  236. %define        ZwSetInformationFile        9*4
  237. %define        KeAttachProcess            0xA*4
  238. %define        KeDetachProcess            0xB*4
  239. %define        KeInitializeDpc            0xC*4
  240. %define        KeInsertQueueDpc        0xD*4
  241.  
  242. %define        MaxImportId        0xE
  243.  
  244. %define        NtSuspendThread        5
  245. %define        NtResumeThread        6
  246.  
  247. %define        Srv_Version    0
  248. %define        Srv_Dump    1
  249. %define        Srv_Suspend    2
  250. %define        Srv_Resume    3
  251. %define        Srv_Bhrama    4
  252. %define        Srv_DumpX    5
  253. %define        Srv_Load    6
  254. %define        MaxSrv        7
  255.  
  256. %define        CRLF_0            13,10,0
  257.  
  258. %endif
  259.